import Taro from '@tarojs/taro';

interface SystemInfo {
 statusBarHeight: number;
 screenHeight: number;
 safeAreaHeight: number;
}

export const getSystemInfo = (): SystemInfo => {
 const systemInfo = Taro.getSystemInfoSync();
 const { statusBarHeight, screenHeight, safeArea } = systemInfo as any;
 const safeAreaHeight = screenHeight - safeArea.bottom;

 return {
  statusBarHeight,
  screenHeight,
  safeAreaHeight
 };
};
